package com.hschinese.pronunciation.activity;

import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.TextView;

import com.hschinese.pronunciation.R;
import com.hschinese.pronunciation.utils.Logger;
import com.hschinese.pronunciation.utils.Utils;
import com.hschinese.pronunciation.widget.Header;

import org.w3c.dom.Text;

public class AboutActivity extends BaseActivity {
    private TextView mVersionView = null;
    private TextView mIntroduceTextView = null;
    private Header mHeader = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        mVersionView = (TextView)findViewById(R.id.about_version);
        mIntroduceTextView = (TextView)findViewById(R.id.about_introduce);
        mIntroduceTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
        mVersionView.setText(Utils.getInnerVersionNo(AboutActivity.this));
        mHeader = (Header)findViewById(R.id.about_header);
        mHeader.setTitle(getResources().getString(R.string.about_us));

        mHeader.setLeftClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        finish();
    }
}
